import '../styles/globals.css'

import { Provider } from 'react-redux'
import { useStore } from '../store'

// function MyApp({ Component, pageProps }) {
//   return <Component {...pageProps} />
// }

// export default MyApp

// interface MyAppProps extends AppInitialProps, AppProps {}


export default function App({ Component, pageProps }) {
  const store = useStore(pageProps.initialReduxState)

  return (
    <Provider store={store}>
      <Component {...pageProps} />
    </Provider>
  )
}